/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.thothtech.xmldb.xml;

import com.sun.org.apache.xerces.internal.parsers.XMLParser;
import java.io.File;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;

/**
 *
 * @author tay-family-linux
 */
public class dbparser {

    private int status = 0;
    private int parseLimit = -1; // amount of data elements to parse
    private String temp = "";

    public void doParse(String xmlFilePath) {
        NodeList nodes = null;
        try {
            File xmlFile = new File(xmlFilePath);
            Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(xmlFile.getAbsolutePath());
            Node docNode = doc.getDocumentElement();
            nodes = docNode.getChildNodes();
        } catch (IOException ex) {
            Logger.getLogger(dbparser.class.getName()).log(Level.SEVERE, null, ex);
        } catch (SAXException ex) {
            Logger.getLogger(XMLParser.class.getName()).log(Level.SEVERE, null, ex);
        } catch (ParserConfigurationException ex) {
            Logger.getLogger(XMLParser.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
}
